﻿<UserControl x:Class="InfFront.InfoViews.WPF.SourceFrame"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:InfFront.InfoViews.WPF"
    Height="Auto" Width="Auto" MinWidth="300" MinHeight="300"
    DataContextChanged="this_DataContextChanged"
    >

    <UserControl.Resources>
        <local:IconedObjectToNormal24x24ImageConverter x:Key="getNormal24x24Image"/>
    </UserControl.Resources>
    
    <UserControl.ContextMenu>
        <ContextMenu Name="contextMenu">
            <MenuItem Header="Preferences" Click="PreferencesMenuItem_Click" />
        </ContextMenu>
    </UserControl.ContextMenu>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.Background>
            <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                <GradientStop Offset="0" Color="{Binding Path=VisualSettings.PrimaryBackgroundColor, FallbackValue=Lavender}"/>
                <GradientStop Offset="1" Color="{Binding Path=VisualSettings.SecondaryBackgroundColor, FallbackValue=Azure}"/>
            </LinearGradientBrush>
        </Grid.Background>

        <local:HyperTextBlock x:Name="descTextBlock" Grid.Row="0"
                              HyperText="{Binding Path=VisualSettings.FormattedPageDescription.Value}" 
                              Margin="4,0,0,0" FontSize="14">
        </local:HyperTextBlock>
        <ContentControl Name="content" Grid.Row="1" Width="Auto" Height="Auto" />
    </Grid>
</UserControl>
